package com.bioroadlab.pojo;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * DiseaseTestObjectRel entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "disease_test_object_rel", catalog = "bioroadlab")
public class DiseaseTestObjectRel implements java.io.Serializable {

	// Fields

	private static final long serialVersionUID = 1L;

	private DiseaseTestObjectRelId id;
	private Disease disease;
	private TestObject testObject;
	private String relativity;

	// Property accessors
	@EmbeddedId
	@AttributeOverrides({
			@AttributeOverride(name = "disease", column = @Column(name = "disease", nullable = false)),
			@AttributeOverride(name = "testObject", column = @Column(name = "test_object", nullable = false)) })
	public DiseaseTestObjectRelId getId() {
		return this.id;
	}

	public void setId(DiseaseTestObjectRelId id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "disease", nullable = false, insertable = false, updatable = false)
	public Disease getDisease() {
		return this.disease;
	}

	public void setDisease(Disease disease) {
		this.disease = disease;
	}

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "test_object", nullable = false, insertable = false, updatable = false)
	public TestObject getTestObject() {
		return this.testObject;
	}

	public void setTestObject(TestObject testObject) {
		this.testObject = testObject;
	}

	@Column(name = "relativity", length = 50)
	public String getRelativity() {
		return this.relativity;
	}

	public void setRelativity(String relativity) {
		this.relativity = relativity;
	}

}